package com.crm.log.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.crm.annotation.SystemServiceLog;
import com.crm.model.SysLog;
import com.crm.service.SysLogService;
import com.crm.util.ResponseUtil;
import com.github.pagehelper.Page;

@Controller
@RequestMapping("/log")
public class SysLogController {
	
	@Autowired
	private SysLogService sysLogService;
	
	/**
	 * 
	 * @Description : 跳转log首页
	 * @author zealot
	 * @param @param page
	 * @param @param map
	 * @param @return
	 * @return String
	 * @version 创建时间 : 2016年11月17日 下午4:08:40
	 * @thorws
	 */
	
	@RequestMapping("/index")
	public String index(){
		return "syslog/log";
	}
	
	@RequestMapping("/load")
	public void load(Page<SysLog> page, SysLog sysLog,HttpServletResponse response,HttpServletRequest request){
		Page<SysLog> list = (Page<SysLog>) sysLogService.selectAll(page, sysLog);
		ResponseUtil.resultPage(response,request,list);
	}
}
